#include<iostream>
using namespace std;

class Person
{
private:
  /* data */
public:
  string name;
  Person() {
    cout<< "调用默认构造函数" << endl;
  }
  Person(const Person * p) {
    cout << "调用拷贝构造函数" << endl;
    name = p -> name;
    name = "hh";
  }
};

int main() {
  // 调用默认构造函数
  Person p1;
  p1.name = "XL";
  // 调用拷贝构造函数
  Person p2(&p1); // Person p2 = Person(p1);
  cout << p2.name << endl;
  return 0;
}